package com.bnz.consumer;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@RabbitListener(queues = "bnz")
@Component
public class Listener01 {

    //1. 获取直连(direct)消息: 适合于一对一发送
    @RabbitHandler
    public void getDirectMessage(String message){
        System.out.println("[direct]:" + message);
    }
}
